import { defineStore } from "pinia";

export const useAppStore = defineStore({
  id: "userinfo",
  state: () => ({
    user_id: Number(localStorage.getItem("user_id")),
    userName: localStorage.getItem("userName"),
  }),
  actions: {
    setUser_id(val: number) {
      this.user_id = val;
    },
    setUserName(val: string) {
      this.userName = val;
    },
  },
});
